<template>
  <view class="main">
    <u-navbar back-icon-color="#fff" title-color="#fff" :background="{ backgroundColor: 'rgb(61, 95, 255)' }"
      title="通讯录"></u-navbar>

    <mine :search="searchData"></mine>
    <u-toast ref="uToast" />
  </view>
</template>
<script>
import mine from './company/index.vue'
import cityAndCustomer from "@/pages/components/cityAndCustomer.vue";// 区县和煤矿企业下拉组件
export default {
  components: {
    mine,
    cityAndCustomer
  },
  data () {
    return {
      searchData: {
        countyNo: '',
        countyStr: '所有区县',
        // customerStr: '所有煤矿',
        customerCode: '', //企业编码
        customerName: '', //企业名称
        customerNo: '',// //企业编码
        nameOrDep: ''
      },
    }
  },
  onLoad () {
    if (getApp().globalData.userInfo.superviseLevel === '50') {
      this.searchData.countyNo = getApp().globalData.userInfo.countyNo
    }
  },
  methods: {
    searchList (e) {// 获取筛选的区县和煤矿名称
      this.searchData = Object.assign(this.searchData, e);
    },
    // 重置筛选
    resetSearch () {
      this.searchData = {
        countyNo: '',
        countyStr: '所有区县',
        // customerStr: '所有煤矿',
        customerCode: '', //企业编码
        customerName: '', //企业名称
        customerNo: '',// //企业编码
      }
      if (getApp().globalData.userInfo.superviseLevel === '50') {
        this.searchData.countyNo = getApp().globalData.userInfo.countyNo
      }
    }
  }
}
</script>
<style lang="scss" scoped>
.total-value {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 4px;
  width: 140rpx;
  margin-right: 20rpx;

  .value {
    color: #288cfe;
    font-weight: bold;
  }

  .unit {
    margin-left: 10rpx;
    color: #999999;
  }
}

.zz-total {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 4px;
  width: 100%;
  padding: 16rpx 0;

  .value {
    color: #288cfe;
    font-weight: bold;
  }

  .unit {
    margin-left: 10rpx;
    color: #999999;
  }
}

.alarm-input {
  background: rgba(255, 255, 255, 0.5);
  max-width: 180rpx;
  padding: 0 10rpx;
  border-radius: 4px;
  margin-right: 20rpx;
  display: flex;
  align-items: center;
  padding: 0 10rpx !important;
}

.alarm-button {
  margin-left: 0;
  margin-right: 0;
}
</style>
